﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="NewTopic_Edit.aspx.cs" Inherits="BBS_NewTopic_Edit" %>

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>修改主题帖子</title>
    <link href="css/style.css" rel="stylesheet" type="text/css" />
    <script language="JavaScript" type ="text/javascript" >		
		<!--
		  function DoTitle(addTitle)
		  {
		    var revisedTitle;
		    var currentTitle = document.myform.subject.value;
		    if(currentTitle.length<50)
		    {
				//alert(currentTitle.length);
				revisedTitle =addTitle+currentTitle;
				document.myform.subject.value=revisedTitle;
				document.myform.subject.focus();
		    }
		    else
			{
				alert("话题字数应小于50个！！");
			}
		    return; 
		   } 
			
			function insertsmilie(smilieface)
			{
			  document.myform.sContent.value+=smilieface;
			}

		function AddItem(strFileName)
		{
		  document.myform.IncludePic.checked=true;
		  document.myform.DefaultPicUrl.value=strFileName;
		  document.myform.DefaultPicList.options[document.myform.DefaultPicList.length]=new Option(strFileName,strFileName);
		  document.myform.DefaultPicList.selectedIndex+=1;
		  if(document.myform.UploadFiles.value=='')
		  {
		  	document.myform.UploadFiles.value=strFileName;
		  }
		  else
		  {
		    document.myform.UploadFiles.value=document.myform.UploadFiles.value+"|"+strFileName;
		  }
		}
		
		function CheckForm()
		{
		  if (editor.EditMode.checked==true)
		  	  document.myform.Content.value=editor.HtmlEdit.document.body.innerText;
		  else
		  	  document.myform.Content.value=editor.HtmlEdit.document.body.innerHTML; 
		  return true;
		 }
		 
		 function ccc()
		 {
		   editor.HtmlEdit.document.body.innerHTML=document.myform.Content.value;
		   //alert(document.myform.Content.value);
		 }
		 -->
		</script>
</head>
<body leftMargin="0" topMargin="0" onload="ccc()">
 <form id="myform" onsubmit="return CheckForm();" method="post" runat="server">
<table cellspacing="0" cellpadding="0" width="900" align="center"  >
  <tr>
    <td>
     <table style ="width :100%; height :26;" border="0" align="center" cellpadding="0" cellspacing="0">
       <tr>
         <td style ="background-color :#ffffff;">&nbsp;&nbsp;<img id="imgIndicator" src ="images/Point02.gif" style ="width :13; height :13;" alt ="当前位置" />
           当前位置：<a href="index.aspx">论坛首页</a>-&gt;修改主题帖子</td>
       </tr>
      </table>
      <table style="BORDER-COLLAPSE: collapse" bordercolor="#6595d6" cellspacing="0" cellpadding="5" width="100%" align="center" border="1"  bgcolor ="#ffffff">
		<tr>
		  <td colspan="2" align="center"  style ="width :100%;background-color :#E2EBF5;" ><b>修改主题帖子</b></td>
		</tr>			
		<tr style ="height :30;">
		  <td align="right" style ="width :120;" >
				<select onchange="DoTitle(this.options[this.selectedIndex].value)" name="font">
				 <option value="" selected >选择话题</option>
				 <option value="[原创]" >[原创]</option>
				 <option value="[转帖]" >[转帖]</option>
				 <option value="[灌水]" >[灌水]</option>
				 <option value="[讨论]" >[讨论]</option>
				 <option value="[求助]" >[求助]</option>
				 <option value="[推荐]" >[推荐]</option>
				 <option value="[公告]" >[公告]</option>
				 <option value="[注意]" >[注意]</option>
				 <option value="[贴图]" >[贴图]</option>
				 <option value="[建议]" >[建议]</option>
				 <option value="[下载]" >[下载]</option>
				 <option value="[分享]" >[分享]</option></select>						
				</td>
				<td><input name="subject" id="subject" size="50" maxlength="50" runat ="server" />
				</td>
			</tr>				
		<tr>
          <td valign="middle" align ="right" >信息内容</td>
          <td>
              <asp:textbox id="Content" style="DISPLAY: none" runat="server" TextMode="MultiLine">&nbsp;</asp:textbox>
              <iframe id="editor" style="width: 620px; height: 400px" src="Editor/editor.aspx" frameBorder="1" scrolling="no"></iframe>
           </td>
        </tr>				
	</table>
    </td>
  </tr>
	<tr style ="height :40;" >
      <td align ="center" >
	     <asp:imagebutton id="Submit" OnClick="Submit_Click" Runat="server" ImageUrl="images/fabu.gif" ></asp:imagebutton>&nbsp;
		 <asp:imagebutton id="Reset" OnClick="Reset_Click" Runat="server" ImageUrl="images/cancle.gif" ></asp:imagebutton></td>   
	</tr>
 </table> 	
    </form>
</body>
</html>
